<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>wifi attendance</title>
</head>
<body>
    {% if request.user.is_authenticated %}
        <p>hi, {{ request.user.last_name }}{{ request.user.first_name }}</p>
    {% endif %}
    <p>{{ msg }}</p>
    {% if perms.mobile_scanner.view_staffonlinehistory %}
        <p>您是HR，有权限查看所有的员工数据。<a href="/staff">戳这里去看所有的员工数据</a></p>
    {% endif %}
    <p>以下是您的考勤数据</p>
    <table border="1">
        <thead>
            <tr>
                <th>日期</th>
                <th>最早在线时间</th>
                <th>最晚在线时间</th>
            </tr>
        </thead>
        <tbody>
            {% for history in histories %}
                <tr>
                    <td>{{ history.date }} </td>
                    <td>{{ history.min_time }}</td>
                    <td>{{ history.max_time }}</td>
                </tr>
            {% endfor %}
        </tbody>
    </table>
</body>
</html>